<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>产品订购专题页面</title>
<style type="text/css">
 body{font-family:"宋体",Arial Narrow,arial,serif;background:#ffffff;font-size:13px;}
 .form_box{  width:800px;overflow:hidden; clear:both; border:1px #CCCCCC solid; padding-bottom:20px;}
 .field { padding-bottom: 2px; margin: 5px auto 0px; padding-left: 10px; width: 700px; padding-right: 10px; float: left; clear: left; padding-top: 0px; _display: inline }
 .field label { text-align: right; line-height: 25px; width: 100px; padding-right: 20px; float: left; height: 25px; color: #333; font-size: 14px }
 .field .field_input{ float: left}
 .field label span{color:#f00; padding:0 5px 0 0;}
 .field .f-textarea { margin: 0px 0px 0px; width: 500px; float: left; height: 100px }
 .field_btn{ background:url(http://www.173php.com/dingdan/dimages/btn.jpg) no-repeat 0 0;border:none; width:113px; height:31px; margin:20px 0 0 100px;}
</style>
</head>

<body>
	 <FORM method=post name=form1 action="actOrder.php" onSubmit="return checkform();">
	 <input name="type_id" type="hidden" value="1" />
<div class="form_box">
   <img src="http://www.173php.com/dingdan/dimages/line.jpg" width="800" height="50" />
<div class="field">
<label><span>*</span>产品名：</label>
      <select name="good_name" onChange="oprize()">
	<option value="秋天外套一条298元全国免运费|298">秋天外套一条298元全国免运费</option>
	<option value="秋天外套买二赠一共三条596元全国免运费|596">秋天外套买二赠一共三条596元全国免运费</option>
	<option selected="selected" value="秋天外套买三赠二共五条894元全国免运费|894">秋天外套买三赠二共五条894元全国免运费</option>
</select>
	</div>
<div class="field">
        <label><span>*</span>订购数量：</label>
        <input tabindex="1" size="10" name="good_num" type="text" class="f-input" id="mun" maxlength="100" value="1" onChange="oprize()"/> 部
	</div>
	<div class="field">
        <label><span>*</span>价格：</label>
        <input tabindex="1" size="10" name="price" type="text" class="f-input" id="price" maxlength="100" value=""/>
	</div>
    <div class="field">
        <label><span>*</span>订购人姓名：</label>
        <input tabindex="1" size="30" name="receiver_name" type="text" class="f-input" id="realname" maxlength="100" value="" />
	</div>
<div class="field">
        <label><span>*</span>手机：</label>
        <input tabindex="1" size="30" name="phone" type="text" class="f-input" id="phone" maxlength="100" value="" />
	</div>
	<div class="field">
        <label><span>*</span>电话：</label>
        <input tabindex="1" size="30" name="tel" type="text" class="f-input" id="tel" maxlength="100" value="" />
	</div>
		<div class="field">
        <label><span></span>QQ：</label>
        <input tabindex="1" size="30" name="qq" type="text" class="f-input" id="qq" maxlength="100" value="" />
	</div>
		<div class="field">
        <label><span></span>Email：</label>
        <input tabindex="1" size="30" name="email" type="text" class="f-input" id="email" maxlength="100" value="" />
	</div>
<div class="field">
        <label><span>*</span>详细地址：</label>
        <input tabindex="1"  name="address" type="text" class="f-input" id="addess" style="width:500px;" value="" />
	</div>
<div class="field">
        <label><span>*</span>支付方式：</label>
        <input name="pay_type"  id=pay_type type="radio" value="货到付款" CHECKED onclick="opay2()"/> 货到付款&nbsp;&nbsp;
        <input type="radio" name="pay_type"  id=pay_type value="支付宝支付" onclick="opay()" /> 支付宝支付
  </div>
<div class="field">
        <label><span>*</span>送货时间：</label>
        <div class="field_input"><input name="delivery_time" type="radio" value="工作日、双休日与节假日均可送货" checked="checked" />
                  工作日、双休日与节假日均可送货<br />
		<input name="delivery_time" type="radio" value="只工作日送货（双休日、假日不用送）（注：写字楼/商用地址客户请选择）" />
		          只工作日送货（双休日、假日不用送）（注：写字楼/商用地址客户请选择）<br />
		<input name="delivery_time" type="radio" value="学校地址/地址白天没人，请尽量安排其他时间送货（注：特别安排可能超出预计送货天数）" />
		          学校地址/地址白天没人，请尽量安排其他时间送货（注：特别安排可能超出预计送货天数）</div>
  </div>
<div class="field">
        <label><span>*</span>订购留言：</label>
        <textarea tabindex="8" name="comments" type="text" class="f-textarea" id="comments"></textarea>
	</div>
<div class="field"><input type=submit name=submit value=""  class="field_btn"/></div>
</div>
</FORM><SCRIPT language=javascript>
function checkform()
{
	var realname=document.form1.realname.value;
	bb=realname.replace(/^\s+|\s+$/g, '');
	if(bb=="" || bb==null)
	{
		alert("收货人姓名不能为空！");
		document.form1.realname.focus();
		return false;
	}
	var tel=document.form1.tel.value;
	if(tel=="")
	{
		alert("电话不能为空！");
		document.form1.tel.focus();
		return false;
	}
	var reg=/^[0-9-]+$/;
	if (!reg.test(tel))
	{
		alert('电话必须为数字!');
		document.form1.tel.focus();
		return false;
	}
	var addess=document.form1.addess.value;;
	baddess=addess.replace(/^\s+|\s+$/g, '');
	if(baddess=="")
	{
		alert("送货地址不能为空！");
		document.form1.addess.focus();
		return false;
	}
	if(baddess.length<6)
	{
		alert("送货地址要写全！");
		document.form1.addess.focus();
		return false;
	}
	return true;
}
function oprize()
{
	var tpri=document.form1.good_name.value
	var spri=tpri.split('|');
	var pri=spri[1];
	if(document.form1.good_num.value=="" || document.form1.good_num.value==0)
	{	
		var tmun=1;
	}else{
		var tmun=document.form1.good_num.value;
	}	
	var prit=pri*tmun;
	document.form1.price.value=prit;	
	//alert(document.form1.price.value);
}
//支付宝支付
function opay()
{
	document.getElementById("form1").target="_blank";
}
//不是支付宝支付
function opay2()
{
	document.getElementById("form1").target="";
}
//来源记录
var ref = '';
if (document.referrer.length > 0) {
   ref = document.referrer;
}
try {
   if (ref.length == 0 && opener.location.href.length > 0) {
    ref = opener.location.href;
   }
} catch (e) {

}
document.cookie="HTTPREF=" + ref+";path=/";
oprize();
  </SCRIPT>
</body>
</html>
